<template>
  <div class="important-news">
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item>1</van-swipe-item>
      <van-swipe-item>2</van-swipe-item>
      <van-swipe-item>3</van-swipe-item>
      <van-swipe-item>4</van-swipe-item>
    </van-swipe>
    <div class="list-wrap">
      <component
        :is="item.component"
        v-for="(item, index) in listOne"
        :key="index"
        :news="item"
      />
    </div>
  </div>
</template>

<script>
import { listOne } from "../data";
import NewsSingle from "./smallComponents/newsSingle";
import NewsThree from "./smallComponents/newsThree";
import Popularize from "./smallComponents/popularize";
import TextOnly from "./smallComponents/textOnly";
import HotSection from "./smallComponents/hotSection";
import BigCover from "./smallComponents/bigCover";
export default {
  name: "ImportantNews",
  data() {
    return {
      listOne
    };
  },
  components: {
    NewsSingle,
    NewsThree,
    Popularize,
    TextOnly,
    HotSection,
    BigCover
  }
};
</script>

<style lang="scss" scoped>
.important-news {
  .my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    line-height: 150px;
    text-align: center;
    background-color: #39a9ed;
  }
  .list-wrap {
    padding: 10px;
  }
}
</style>
